class Text(object):
    __slots__ = ('_name', 'age')

    def __init__(self, name, age):
        self._name = name
        self._age = age

    @property
    def name(self):
        return self._name

    @name.setter
    def name(self, name):
        self._name = name

    def text(self):
        print('%s 正在学习' % self._name)


s = Text('sf')
s.text()

